package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ANavigationMapper;
import com.ruoyi.system.domain.ANavigation;
import com.ruoyi.system.service.IANavigationService;

/**
 * 首页导航Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-16
 */
@Service
public class ANavigationServiceImpl implements IANavigationService 
{
    @Autowired
    private ANavigationMapper aNavigationMapper;

    /**
     * 查询首页导航
     * 
     * @param id 首页导航主键
     * @return 首页导航
     */
    @Override
    public ANavigation selectANavigationById(Long id)
    {
        return aNavigationMapper.selectANavigationById(id);
    }

    /**
     * 查询首页导航列表
     * 
     * @param aNavigation 首页导航
     * @return 首页导航
     */
    @Override
    public List<ANavigation> selectANavigationList(ANavigation aNavigation)
    {
        return aNavigationMapper.selectANavigationList(aNavigation);
    }

    /**
     * 新增首页导航
     * 
     * @param aNavigation 首页导航
     * @return 结果
     */
    @Override
    public int insertANavigation(ANavigation aNavigation)
    {
        aNavigation.setCreateTime(DateUtils.getNowDate());
        return aNavigationMapper.insertANavigation(aNavigation);
    }

    /**
     * 修改首页导航
     * 
     * @param aNavigation 首页导航
     * @return 结果
     */
    @Override
    public int updateANavigation(ANavigation aNavigation)
    {
        aNavigation.setUpdateTime(DateUtils.getNowDate());
        return aNavigationMapper.updateANavigation(aNavigation);
    }

    /**
     * 批量删除首页导航
     * 
     * @param ids 需要删除的首页导航主键
     * @return 结果
     */
    @Override
    public int deleteANavigationByIds(Long[] ids)
    {
        return aNavigationMapper.deleteANavigationByIds(ids);
    }

    /**
     * 删除首页导航信息
     * 
     * @param id 首页导航主键
     * @return 结果
     */
    @Override
    public int deleteANavigationById(Long id)
    {
        return aNavigationMapper.deleteANavigationById(id);
    }

    @Override
    public List<ANavigation> selectANavigationXcxList(ANavigation aNavigation) {
        return aNavigationMapper.selectANavigationXcxList(aNavigation);
    }
}
